<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:util="http://java.sun.com/jsf/composite/util">
	<p:contextMenu for="func">
		<p:menuitem value="Adicionar Antes" icon="ui-icon-plus" oncomplete="alert('teste')"/>  
     	<p:menuitem value="Editar" icon="ui-icon-pencil" oncomplete="alert('teste')"/>  
     	<p:menuitem value="Adicionar Depois" icon="ui-icon-plus" oncomplete="alert('teste')"/>
        <p:menuitem value="Delete" icon="ui-icon-close"/>  
    </p:contextMenu>
  
	<p:treeTable id="func" value="#{deBean.root}" var="node" 
		selectionMode="single" selection="#{deBean.node}"  >
		<p:column>
        	<h:outputText rendered="#{node.class eq 'class br.uvv.Model.Esp.FuncionalidadeBase'}" value="#{node.titulo}"/>
        	<p:inplace rendered="#{node.class eq 'class br.uvv.Model.Esp.AcaoBase'}" >
                <p:inputText value="#{node.nivel} - #{node.descricao}" style="width:600px;" />  
            </p:inplace> 
		</p:column>
	</p:treeTable>
</f:view>